package com.classtwo.colleage.conf;

import com.classtwo.colleage.model.Leave_paper;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface DatabaseLeavePaperInfo extends JpaRepository<Leave_paper,Integer> {

    // SELECT * from leave_paper WHERE student_number='201506110168' AND classnode='IMIFUXKN'
    List<Leave_paper> findByStudentNumberAndClassnode(String studentNumber,String classnode);

    // SELECT * from leave_paper WHERE teacher_name='陈英' AND classnode='IMIFUXKN'
    List<Leave_paper> findByTeacherNameAndStatusAndClassnode(String teacher_name, String status,String classnode);

    // SELECT * from leave_paper WHERE id=4
    Leave_paper findFirstById(int id);
}
